package com.demo.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.demo.entity.Dictionary;
import com.demo.entity.from.DictionaryFrom;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 数据字典表非固定值的可后期增变的及全局信息如医院名称、医院logo等 Mapper 接口
 * @author zm
 * @since 2020-11-24
 */
public interface DictionaryMapper extends BaseMapper<Dictionary> {

    /**
     * 获取所有父级字典ID
     * @return
     */
    List<Integer> getParentId();

    /**
     *
     * @param enumerationName
     * @return
     */
    Dictionary getTiming(@Param("enumerationName") String enumerationName);

    /**
     *
     * @param parentDictionaryCode
     * @param enumerationName
     * @return
     */
    Dictionary getMesgSingleObject(@Param("parentDictionaryCode") Integer parentDictionaryCode, @Param("enumerationName") String enumerationName);

    Integer updateDictionary(DictionaryFrom from);
}
